#ifndef WORLDOBJECT_H_
#define WORLDOBJECT_H_
#include "../baseclass/Elem3D.h"
#include "../utils/GeomCompute.h"

#include <math.h>

class WorldObject : public Elem3D
{
  
    short int terrain_tex_map [TERRAIN_POINTS-1][TERRAIN_POINTS-1];
    float Nmap [TERRAIN_POINTS-1][TERRAIN_POINTS-1][3];
    static int terrain_list_name;
 
    float max_dis; 
    

    
public:
     static bool compiled;
        float terrain [TERRAIN_POINTS][TERRAIN_POINTS][3];
    WorldObject(GameStatus* g): Elem3D(g){}
    WorldObject();
    virtual ~WorldObject();
    void Inits(GameStatus *s);
    void LoadLists();
    void Terrain_Generation();
    void Init();
    void Draw();
    void LoadModel();
    float GetHeight(double x, double y);
    float GetHeightFly(double x, double y);
    void Compute_terrain_normals();
};

#endif /*WORLDOBJECT_H_*/

